﻿@using GSLMS.Entity
@using GSLMS.Entity.Enum
@model GSLMS.Entity.TB_APP_PROINFO
@{
    Layout = null;
    int index = 0;
    int index2 = 0;
}
<div class="pageContent">
    <form method="post" id="riskControlForm" action="DianDang/FKAudit/RiskControl/CreateUnHouInfo?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
    onsubmit="return validateCallback(this, dialogAjaxDone)">
    @Html.ValidationSummary(true)
    <div class="pageFormContent" layouth="56">
        @Html.HiddenFor(model => model.ID)
        <p style="width:100%; margin-top:5px;">
          <a href='DianDang/Apply/ProInfo/ReportInfo/@Model.ID?OpID=@ViewData["OperateID"]&actiondo=view' target="dialog" rel="divQueryReport">
                项目经理调查报告</a>
                &nbsp;&nbsp;&nbsp;&nbsp;
           <a href='DianDang/Apply/RefRegInfo/ReportInfo/@Model.ID?OpID=@ViewData["OperateID"]&actiondo=view' target="dialog" rel="divQueryPro">
                符合性查询</a>
        </p>
        <p>
            <label>
                客户名称：</label>
            @Html.ValueFor(model => model.CUSTNAME)
        </p>
        <p>
            <label>
                申请编号：</label>
            <a href="DianDang/Apply/ProInfo/Details/@Model.ID?OpID=@ViewData["OperateID"]" Target="dialog" rel="RiskAuditVPro"  title="查看立项申请【@Model.CUSTNAME】">
               @Model.APPLYNO
             </a>
        </p>
        <p>
            <label>
                金额/费率：</label>
            @Html.ValueFor(model => model.AMOUNT)
            万元
            /
            @Html.ValueFor(model => model.RATE)
            %
        </p>
        <p>
            <label>
                业务类型：</label>
            @((GSLMS.Entity.Enum.ApplyEnum.RegBussType)Model.BUSSTYPE)
        </p>
        <p>
            <label>
                风控经理姓名：</label>
            @Html.ValueFor(model => model.ProUnForHouInfo.RISKBYNAME)
        </p>
        <p>
            <label>
                调查时间：</label>
           @Html.ValueFor(model => model.AduRiskControl.AUDITTIME,"{0:yyyy-MM-dd HH:mm:ss}")
        </p>
        <div class="divider"  style="float:left;width:100%;">
        </div>
        <div class="title" style="float:left;width:100%;">
            <h4>
                客户情况综合认定</h4>
            @foreach (var item in Model.AduRiskControlCust)
            {
                <p style="width: 95%; height: 220px">
                    <label>
                        @item.DATATYPENAME：</label>
                   @* @Html.TextArea(string.Format("AduRiskControlCust[{0}].{1}", index, item.DATATYPE), item.DATACONTENT, new { @class = "", @style = "width:80%;" })
                    @Html.ValidationMessageFor(model => model.ProReport.OTHERREMARK)*@
                    @Html.Hidden("AduRiskControlCust[" + index + "].ID", item.ID)
                    @Html.Hidden("AduRiskControlCust[" + index + "].PROID", item.PROID)
                    @Html.Hidden("AduRiskControlCust[" + index + "].RISKCONID", item.RISKCONID)
                    @Html.Hidden("AduRiskControlCust[" + index + "].DATATYPE", item.DATATYPE)
                    @Html.Hidden("AduRiskControlCust[" + index + "].DATATYPENAME", item.DATATYPENAME)
                    @Html.Hidden("AduRiskControlCust[" + index + "].DATASORTNO", item.DATASORTNO)
                    @Html.TextArea("AduRiskControlCust[" + index + "].DATACONTENT", item.DATACONTENT, new { @class = "editor", @tools = "Cut,Copy,Paste,Pastetext,|,Blocktag,Fontface,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,|,Align,List,Outdent,Indent,Table,|,SelectAll,Removeformat,Preview,Fullscreen", @style = "width:80%;height:215px;" })
                    
                </p>
            
                index += 1;
            }
        </div>
        @Html.HiddenFor(model => model.AduRiskControl.ID)
        @Html.HiddenFor(model => model.AduRiskControl.AUDITBY)
        @Html.HiddenFor(model => model.AduRiskControl.AUDITTIME)
        @Html.HiddenFor(model => model.AduRiskControl.PROID)
        @Html.HiddenFor(model => model.AduRiskControl.STATUS)
        @Html.Hidden("hidActiondo", Model.STATUS)
        <div class="title" style="float:left;width:100%;">
            <h4>
                项目情况综合认定</h4>
           
            @foreach (var item in Model.AduRiskControlPro)
            {
                <p style="width: 95%; height: 220px">
                    <label>
                        @item.DATATYPENAME：</label>
                    @*@Html.TextArea(string.Format("AduRiskControlPro[{0}].{1}", index2, item.DATATYPE), item.DATACONTENT, new { @class = "", @style = "width:80%;" })*@
                    @Html.Hidden("AduRiskControlPro[" + index2 + "].ID", item.ID)
                    @Html.Hidden("AduRiskControlPro[" + index2 + "].PROID", item.PROID)
                    @Html.Hidden("AduRiskControlPro[" + index2 + "].RISKCONID", item.RISKCONID)
                    @Html.Hidden("AduRiskControlPro[" + index2 + "].DATATYPE", item.DATATYPE)
                    @Html.Hidden("AduRiskControlPro[" + index2 + "].DATATYPENAME", item.DATATYPENAME)
                    @Html.Hidden("AduRiskControlPro[" + index2 + "].DATASORTNO", item.DATASORTNO)
                    @Html.TextArea("AduRiskControlPro[" + index2 + "].DATACONTENT", item.DATACONTENT, new { @class = "editor", @tools = "Cut,Copy,Paste,Pastetext,|,Blocktag,Fontface,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,|,Align,List,Outdent,Indent,Table,|,SelectAll,Removeformat,Preview,Fullscreen", @style = "width:80%;height:215px;" })
                </p>
            
                index2 += 1;
            }
        </div>
    </div>
    @if (Model.AduRiskControl.STATUS!=1)
    {
   <div class="formBar" style="display:@(Model.STATUS==1?"none":"inline")">
                    <ul>
                        <li>
                            <div class="buttonActive">
                                <div class="buttonContent">
                                    <button type="button" onclick="sumbitReportInfo(0)">
                                        保存</button></div>
                            </div>
                        </li>
                         <li>
                            <div class="buttonActive">
                                <div class="buttonContent">
                                    <button type="button" onclick="sumbitReportInfo(1)">
                                        提交</button></div>
                            </div>
                        </li>
                    </ul>
                </div>
    }
    </form>
</div>

<script type="text/javascript">
    function sumbitReportInfo(action) {
        var $form = $("#riskControlForm");
        $("#hidActiondo").val(action);

        if (action == 0) {
            validateCallback($form, dialogAjaxDone, "");
        }
        else {
            validateCallback($form, dialogAjaxDone, "您确定要提交对此笔立项申请的审批吗?");
        }

    }
</script>
